<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:cc="http://java.sun.com/jsf/composite/customcomponents"
	contentType="text/html">
	
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title><h:outputText value="#{label['exampleBeanCRUD.title']} - #{label['appNameTitle']}"/></title>
	</h:head>	
  <h:body>
        <h:form>
            <p:dataTable 
            rows="10" 
			paginator="true"
			paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
			rowsPerPageTemplate="5,10,15"  
            id="admisions"  
            var="admision" 
            widgetVar="admisionsTable"  
            filteredValue="#{selectorAdmisionMB.admisionFilterBean}" 
            value="#{selectorAdmisionMB.admision}">
               
           <p:columns value="#{selectorAdmisionMB.columns}" var="column" columnIndexVar="colIndex" sortBy="#{admision[column.property]}" filterBy="#{admision[column.property]}">
	     	    <f:facet name="header">
	                <h:outputText value="#{column.header}" />
	            </f:facet>
	            <h:outputText value="#{admision[column.property]}" />
     	   </p:columns>

                <p:column>
                    <p:commandButton icon="ui-icon-search" actionListener="#{selectorAdmisionMB.selectAdmisionFromDialog(admision)}" />
                </p:column>
            </p:dataTable>
        </h:form>
    </h:body>
</f:view>